<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII">
<title>rotmg</title>
<link rel="stylesheet" href="../../../../boostbook.css" type="text/css">
<meta name="generator" content="DocBook XSL Stylesheets V1.75.2">
<link rel="home" href="../../../../index.html" title="Chapter&#160;1.&#160;Boost.Numeric_Bindings">
<link rel="up" href="../level_1_blas.html" title="Level 1 BLAS">
<link rel="prev" href="rot.html" title="rot">
<link rel="next" href="rotm.html" title="rotm">
</head>
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
<table cellpadding="2" width="100%"><tr><td valign="top"></td></tr></table>
<hr>
<div class="spirit-nav">
<a accesskey="p" href="rot.html"><img src="../../../../images/prev.png" alt="Prev"></a><a accesskey="u" href="../level_1_blas.html"><img src="../../../../images/up.png" alt="Up"></a><a accesskey="h" href="../../../../index.html"><img src="../../../../images/home.png" alt="Home"></a><a accesskey="n" href="rotm.html"><img src="../../../../images/next.png" alt="Next"></a>
</div>
<div class="section">
<div class="titlepage"><div><div><h5 class="title">
<a name="boost_numeric_bindings.reference.blas.level_1_blas.rotmg"></a><a class="link" href="rotmg.html" title="rotmg">rotmg</a>
</h5></div></div></div>
<a name="boost_numeric_bindings.reference.blas.level_1_blas.rotmg.prototype"></a><h6>
<a name="id756715"></a>
            <a class="link" href="rotmg.html#boost_numeric_bindings.reference.blas.level_1_blas.rotmg.prototype">Prototype</a>
          </h6>
<p>
            There are two prototypes of <code class="computeroutput"><span class="identifier">rotmg</span></code>
            available, please see below. 
</p>
<pre class="programlisting"><span class="identifier">rotmg</span><span class="special">(</span> <span class="identifier">Scalar</span> <span class="special">&gt;,</span> <span class="identifier">Scalar</span> <span class="special">&gt;,</span> <span class="identifier">Scalar</span> <span class="special">&gt;,</span> <span class="keyword">const</span> <span class="identifier">Scalar</span> <span class="special">&gt;,</span>
        <span class="identifier">VectorSPARAM</span><span class="special">&amp;</span> <span class="identifier">sparam</span> <span class="special">);</span>
</pre>
<p>
          </p>
<p>
            
</p>
<pre class="programlisting"><span class="identifier">rotmg</span><span class="special">(</span> <span class="identifier">Scalar</span> <span class="special">&gt;,</span> <span class="identifier">Scalar</span> <span class="special">&gt;,</span> <span class="identifier">Scalar</span> <span class="special">&gt;,</span> <span class="keyword">const</span> <span class="identifier">Scalar</span> <span class="special">&gt;,</span>
        <span class="identifier">VectorDPARAM</span><span class="special">&amp;</span> <span class="identifier">dparam</span> <span class="special">);</span>
</pre>
<p>
          </p>
<a name="boost_numeric_bindings.reference.blas.level_1_blas.rotmg.description"></a><h6>
<a name="id756958"></a>
            <a class="link" href="rotmg.html#boost_numeric_bindings.reference.blas.level_1_blas.rotmg.description">Description</a>
          </h6>
<p>
            <code class="computeroutput"><span class="identifier">rotmg</span></code> (short for TODO)
            provides a C++ interface to BLAS routines SROTMG and DROTMG. CONSTRUCT
            THE MODIFIED GIVENS TRANSFORMATION MATRIX H WHICH ZEROS THE SECOND COMPONENT
            OF THE 2-VECTOR (DSQRT(DD1)<span class="bold"><strong>DX1,DSQRT(DD2)</strong></span>
            DY2)**T. WITH DPARAM(1)=DFLAG, H HAS ONE OF THE FOLLOWING FORMS..
          </p>
<p>
            DFLAG=-1.D0 DFLAG=0.D0 DFLAG<code class="literal">1.D0 DFLAG</code>-2.D0
          </p>
<p>
            (DH11 DH12) (1.D0 DH12) (DH11 1.D0) (1.D0 0.D0) H=( ) ( ) ( ) ( ) (DH21
            DH22), (DH21 1.D0), (-1.D0 DH22), (0.D0 1.D0). LOCATIONS 2-4 OF DPARAM
            CONTAIN DH11, DH21, DH12, AND DH22 RESPECTIVELY. (VALUES OF 1.D0, -1.D0,
            OR 0.D0 IMPLIED BY THE VALUE OF DPARAM(1) ARE NOT STORED IN DPARAM.)
          </p>
<p>
            THE VALUES OF GAMSQ AND RGAMSQ SET IN THE DATA STATEMENT MAY BE INEXACT.
            THIS IS OK AS THEY ARE ONLY USED FOR TESTING THE SIZE OF DD1 AND DD2.
            ALL ACTUAL SCALING OF DATA IS DONE USING GAM.
          </p>
<p>
            The selection of the BLAS routine is done during compile-time, and is
            determined by the type of values contained in type <code class="computeroutput"><span class="identifier">VectorSPARAM</span></code>.
            The type of values is obtained through the <code class="computeroutput"><span class="identifier">value_type</span></code>
            meta-function <code class="computeroutput"><span class="keyword">typename</span> <span class="identifier">value_type</span><span class="special">&lt;</span><span class="identifier">VectorSPARAM</span><span class="special">&gt;::</span><span class="identifier">type</span></code>. Table X below illustrates to
            which specific routine this dispatching will take place.
          </p>
<div class="table">
<a name="boost_numeric_bindings.reference.blas.level_1_blas.rotmg.dispatching_of_rotmg_"></a><p class="title"><b>Table&#160;1.24.&#160;Dispatching of rotmg.</b></p>
<div class="table-contents"><table class="table" summary="Dispatching of rotmg.">
<colgroup>
<col>
<col>
<col>
<col>
</colgroup>
<thead><tr>
<th>
                    <p>
                      Value type of VectorSPARAM
                    </p>
                  </th>
<th>
                    <p>
                      BLAS routine
                    </p>
                  </th>
<th>
                    <p>
                      CBLAS routine
                    </p>
                  </th>
<th>
                    <p>
                      CUBLAS routine
                    </p>
                  </th>
</tr></thead>
<tbody>
<tr>
<td>
                    <p>
                      <code class="computeroutput"><span class="keyword">float</span></code>
                    </p>
                  </td>
<td>
                    <p>
                      SROTMG
                    </p>
                  </td>
<td>
                    <p>
                      cblas_srotmg
                    </p>
                  </td>
<td>
                    <p>
                      cublasSrotmg
                    </p>
                  </td>
</tr>
<tr>
<td>
                    <p>
                      <code class="computeroutput"><span class="keyword">double</span></code>
                    </p>
                  </td>
<td>
                    <p>
                      DROTMG
                    </p>
                  </td>
<td>
                    <p>
                      cblas_drotmg
                    </p>
                  </td>
<td>
                    <p>
                      cublasDrotmg
                    </p>
                  </td>
</tr>
</tbody>
</table></div>
</div>
<br class="table-break"><p>
            The original routines SROTMG and DROTMG have five arguments, whereas
            <code class="computeroutput"><span class="identifier">rotmg</span></code> requires five arguments.
          </p>
<div class="table">
<a name="boost_numeric_bindings.reference.blas.level_1_blas.rotmg.deduction_of_arguments_of_rotmg_"></a><p class="title"><b>Table&#160;1.25.&#160;Deduction of arguments of rotmg.</b></p>
<div class="table-contents"><table class="table" summary="Deduction of arguments of rotmg.">
<colgroup></colgroup>
<tbody></tbody>
</table></div>
</div>
<br class="table-break"><a name="boost_numeric_bindings.reference.blas.level_1_blas.rotmg.definition"></a><h6>
<a name="id757307"></a>
            <a class="link" href="rotmg.html#boost_numeric_bindings.reference.blas.level_1_blas.rotmg.definition">Definition</a>
          </h6>
<p>
            Defined in header <code class="computeroutput">boost/numeric/bindings/blas/level1/rotmg.hpp</code>.
          </p>
<a name="boost_numeric_bindings.reference.blas.level_1_blas.rotmg.parameters_or_requirements_on_types"></a><h6>
<a name="id757346"></a>
            <a class="link" href="rotmg.html#boost_numeric_bindings.reference.blas.level_1_blas.rotmg.parameters_or_requirements_on_types">Parameters
            or Requirements on Types</a>
          </h6>
<div class="variablelist">
<p class="title"><b>Parameters</b></p>
<dl>
<dt><span class="term">MatrixA</span></dt>
<dd><p>
                  The definition of term 1
                </p></dd>
<dt><span class="term">MatrixB</span></dt>
<dd><p>
                  The definition of term 2
                </p></dd>
<dt><span class="term">MatrixC</span></dt>
<dd>
<p>
                  The definition of term 3.
                </p>
<p>
                  Definitions may contain paragraphs.
                </p>
</dd>
</dl>
</div>
<a name="boost_numeric_bindings.reference.blas.level_1_blas.rotmg.complexity"></a><h6>
<a name="id757432"></a>
            <a class="link" href="rotmg.html#boost_numeric_bindings.reference.blas.level_1_blas.rotmg.complexity">Complexity</a>
          </h6>
<a name="boost_numeric_bindings.reference.blas.level_1_blas.rotmg.example"></a><h6>
<a name="id757457"></a>
            <a class="link" href="rotmg.html#boost_numeric_bindings.reference.blas.level_1_blas.rotmg.example">Example</a>
          </h6>
<p>
            
</p>
<pre class="programlisting"><span class="preprocessor">#include</span> <span class="special">&lt;</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">numeric</span><span class="special">/</span><span class="identifier">bindings</span><span class="special">/</span><span class="identifier">blas</span><span class="special">/</span><span class="identifier">level1</span><span class="special">/</span><span class="identifier">rotmg</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">&gt;</span>
<span class="keyword">using</span> <span class="keyword">namespace</span> <span class="identifier">boost</span><span class="special">::</span><span class="identifier">numeric</span><span class="special">::</span><span class="identifier">bindings</span><span class="special">;</span>

<span class="identifier">blas</span><span class="special">::</span><span class="identifier">rotmg</span><span class="special">(</span> <span class="identifier">x</span><span class="special">,</span> <span class="identifier">y</span><span class="special">,</span> <span class="identifier">z</span> <span class="special">);</span>

</pre>
<p>
          </p>
<p>
            this will output
          </p>
<p>
            
</p>
<pre class="programlisting"><span class="special">[</span><span class="number">5</span><span class="special">]</span> <span class="number">0</span> <span class="number">1</span> <span class="number">2</span> <span class="number">3</span> <span class="number">4</span> <span class="number">5</span>
</pre>
<p>
          </p>
<a name="boost_numeric_bindings.reference.blas.level_1_blas.rotmg.notes"></a><h6>
<a name="id757739"></a>
            <a class="link" href="rotmg.html#boost_numeric_bindings.reference.blas.level_1_blas.rotmg.notes">Notes</a>
          </h6>
<a name="boost_numeric_bindings.reference.blas.level_1_blas.rotmg.see_also"></a><h6>
<a name="id757763"></a>
            <a class="link" href="rotmg.html#boost_numeric_bindings.reference.blas.level_1_blas.rotmg.see_also">See
            Also</a>
          </h6>
<div class="itemizedlist"><ul class="itemizedlist" type="disc"><li class="listitem">
                Originating Fortran source files <a href="http://www.netlib.org/blas/srotmg.f" target="_top">srotmg.f</a>
                and <a href="http://www.netlib.org/blas/drotmg.f" target="_top">drotmg.f</a>
                at Netlib.
              </li></ul></div>
</div>
<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>
<td align="left"></td>
<td align="right"><div class="copyright-footer">Copyright &#169; 2002 -2009 Rutger ter Borg, Kre&#353;imir Fresl, Thomas Klimpel,
      Toon Knapen, Karl Meerbergen<p>
        Distributed under the Boost Software License, Version 1.0. (See accompanying
        file LICENSE_1_0.txt or copy at <a href="http://www.boost.org/LICENSE_1_0.txt" target="_top">http://www.boost.org/LICENSE_1_0.txt</a>)
      </p>
</div></td>
</tr></table>
<hr>
<div class="spirit-nav">
<a accesskey="p" href="rot.html"><img src="../../../../images/prev.png" alt="Prev"></a><a accesskey="u" href="../level_1_blas.html"><img src="../../../../images/up.png" alt="Up"></a><a accesskey="h" href="../../../../index.html"><img src="../../../../images/home.png" alt="Home"></a><a accesskey="n" href="rotm.html"><img src="../../../../images/next.png" alt="Next"></a>
</div>
</body>
</html>
